<template>
  <div>
    <h2>子组件</h2>
    <input type="text" :value="value" @input="fn" />
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: String,
      required: true,
    },
  },
  methods: {
    fn(e) {
      this.$emit("input", e.target.value);
    },
  },
};
</script>

<style></style>
